from comment.utils.serializers import BaseListSerializer

class BankCardListSerializer(BaseListSerializer):
    '''
    银行卡列表数据的序列化的类
    '''
    def to_dict(self):
        lst=[]
        for card in self.data_list:
            lst.append(
                {
                    'cardId':card.bankInfoId,
                    'cardNum':card.bankCardNum,
                    'bankName':card.openingBank
                }
            )
        return lst









